package com.example.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.pojo.Competitions.Competitions;
import com.example.demo.pojo.Competitions.UserCompetitionDetail;
import com.example.demo.pojo.R;
import org.apache.poi.ss.formula.functions.T;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public interface CompetitionService extends IService<Competitions>, Serializable {

    R<T> joinCompetition(String token, Integer id,String passcode);


    R<Map<String, Object>> getAllCompetition(int pageNum, int pageSize);

    R<Map<String, Object>> getJoinCompetitionUserById(int id, int pageNum, int pageSize);

    R<Competitions> getCompetitionById(Integer CompetitionsId);

    void proveCompetition(Integer id);

    R<Competitions> getCompetitionsById(int id);
    R<List<UserCompetitionDetail>> getUserCompetitions(String token);

    R<List<Competitions>> getCompetitionsByCompetitionsName(String competitionsName);
}
